

package com.springcloud.sc.ucp.v5.api.feign;

import com.springcloud.sc.comm.core.constant.ServiceNameConstants;
import com.springcloud.sc.comm.core.util.R;
import com.springcloud.sc.ucp.v5.api.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhl
 */
@FeignClient(contextId = "ucpRemoteUserService", value = ServiceNameConstants.UMPS_SERVICE)
public interface UcpRemoteUserService {

    @RequestMapping(value="/user/saveUserAPI" , method = RequestMethod.POST)
    Boolean saveUserAPI(@RequestBody UserVO userVO);

    @RequestMapping(value="/user/updateUserAPI" , method = RequestMethod.POST)
    Boolean updateUserAPI(@RequestParam("userId") String userId, @RequestParam("username") String username);

    @RequestMapping(value="/user/updateUserPasswordAPI" , method = RequestMethod.POST)
    Boolean updateUserPasswordAPI(@RequestParam("userId") String userId, @RequestParam("password") String password);

    @RequestMapping(value="/user/deleteUserAPI" , method = RequestMethod.POST)
    Boolean deleteUserAPI(@RequestParam("userId") String userId);

    @GetMapping("/user/findUserByUserId/{userId}")
    UserVO findUserByUserId(@PathVariable("userId") String userId);

    @GetMapping("/user/getUser")
    R getUser();
}
